\(\int \frac {d+e x+f x^2}{(4-5 x^2+x^4)^2} \, dx\) [27]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 115 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \text {arctanh}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \text {arctanh}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right ) \]

[Out]

1/18*e*(-2*x^2+5)/(x^4-5*x^2+4)+1/72*x*(17*d+20*f-(5*d+8*f)*x^2)/(x^4-5*x^2+4)+1/432*(19*d+52*f)*arctanh(1/2*x
)-1/54*(d+7*f)*arctanh(x)+1/27*e*ln(-x^2+1)-1/27*e*ln(-x^2+4)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {1687, 1192, 1180, 213, 12, 1121, 628, 630, 31} \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{432} \text {arctanh}\left (\frac {x}{2}\right ) (19 d+52 f)-\frac {1}{54} \text {arctanh}(x) (d+7 f)+\frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right )+\frac {e \left (5-2 x^2\right )}{18 \left (x^4-5 x^2+4\right )} \]

[In]

Int[(d + e*x + f*x^2)/(4 - 5*x^2 + x^4)^2,x]

[Out]

(e*(5 - 2*x^2))/(18*(4 - 5*x^2 + x^4)) + (x*(17*d + 20*f - (5*d + 8*f)*x^2))/(72*(4 - 5*x^2 + x^4)) + ((19*d +
 52*f)*ArcTanh[x/2])/432 - ((d + 7*f)*ArcTanh[x])/54 + (e*Log[1 - x^2])/27 - (e*Log[4 - x^2])/27

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 628

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^(p + 1)/((p + 1
)*(b^2 - 4*a*c))), x] - Dist[2*c*((2*p + 3)/((p + 1)*(b^2 - 4*a*c))), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rule 630

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 1121

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 1180

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 1192

Int[((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[x*(a*b*e - d*(b^2 - 2*a
*c) - c*(b*d - 2*a*e)*x^2)*((a + b*x^2 + c*x^4)^(p + 1)/(2*a*(p + 1)*(b^2 - 4*a*c))), x] + Dist[1/(2*a*(p + 1)
*(b^2 - 4*a*c)), Int[Simp[(2*p + 3)*d*b^2 - a*b*e - 2*a*c*d*(4*p + 5) + (4*p + 7)*(d*b - 2*a*e)*c*x^2, x]*(a +
 b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e
^2, 0] && LtQ[p, -1] && IntegerQ[2*p]

Rule 1687

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {e x}{\left (4-5 x^2+x^4\right )^2} \, dx+\int \frac {d+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx \\ & = \frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}-\frac {1}{72} \int \frac {-d+20 f+(5 d+8 f) x^2}{4-5 x^2+x^4} \, dx+e \int \frac {x}{\left (4-5 x^2+x^4\right )^2} \, dx \\ & = \frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{2} e \text {Subst}\left (\int \frac {1}{\left (4-5 x+x^2\right )^2} \, dx,x,x^2\right )-\frac {1}{54} (-d-7 f) \int \frac {1}{-1+x^2} \, dx-\frac {1}{216} (19 d+52 f) \int \frac {1}{-4+x^2} \, dx \\ & = \frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)-\frac {1}{9} e \text {Subst}\left (\int \frac {1}{4-5 x+x^2} \, dx,x,x^2\right ) \\ & = \frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)-\frac {1}{27} e \text {Subst}\left (\int \frac {1}{-4+x} \, dx,x,x^2\right )+\frac {1}{27} e \text {Subst}\left (\int \frac {1}{-1+x} \, dx,x,x^2\right ) \\ & = \frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.97 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{864} \left (\frac {12 \left (17 d x+20 f x-5 d x^3-8 f x^3+e \left (20-8 x^2\right )\right )}{4-5 x^2+x^4}+8 (d+4 e+7 f) \log (1-x)-(19 d+32 e+52 f) \log (2-x)-8 (d-4 e+7 f) \log (1+x)+(19 d-32 e+52 f) \log (2+x)\right ) \]

[In]

Integrate[(d + e*x + f*x^2)/(4 - 5*x^2 + x^4)^2,x]

[Out]

((12*(17*d*x + 20*f*x - 5*d*x^3 - 8*f*x^3 + e*(20 - 8*x^2)))/(4 - 5*x^2 + x^4) + 8*(d + 4*e + 7*f)*Log[1 - x]
- (19*d + 32*e + 52*f)*Log[2 - x] - 8*(d - 4*e + 7*f)*Log[1 + x] + (19*d - 32*e + 52*f)*Log[2 + x])/864

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.91

method result size
norman \(\frac {\left (-\frac {5 d}{72}-\frac {f}{9}\right ) x^{3}+\left (\frac {17 d}{72}+\frac {5 f}{18}\right ) x -\frac {e \,x^{2}}{9}+\frac {5 e}{18}}{x^{4}-5 x^{2}+4}+\left (-\frac {19 d}{864}-\frac {e}{27}-\frac {13 f}{216}\right ) \ln \left (x -2\right )+\left (-\frac {d}{108}+\frac {e}{27}-\frac {7 f}{108}\right ) \ln \left (x +1\right )+\left (\frac {d}{108}+\frac {e}{27}+\frac {7 f}{108}\right ) \ln \left (x -1\right )+\left (\frac {19 d}{864}-\frac {e}{27}+\frac {13 f}{216}\right ) \ln \left (x +2\right )\) \(105\)
default \(-\frac {\frac {d}{144}-\frac {e}{72}+\frac {f}{36}}{x +2}+\left (\frac {19 d}{864}-\frac {e}{27}+\frac {13 f}{216}\right ) \ln \left (x +2\right )+\left (-\frac {d}{108}+\frac {e}{27}-\frac {7 f}{108}\right ) \ln \left (x +1\right )-\frac {\frac {d}{36}-\frac {e}{36}+\frac {f}{36}}{x +1}-\frac {\frac {d}{36}+\frac {e}{36}+\frac {f}{36}}{x -1}+\left (\frac {d}{108}+\frac {e}{27}+\frac {7 f}{108}\right ) \ln \left (x -1\right )+\left (-\frac {19 d}{864}-\frac {e}{27}-\frac {13 f}{216}\right ) \ln \left (x -2\right )-\frac {\frac {d}{144}+\frac {e}{72}+\frac {f}{36}}{x -2}\) \(130\)
risch \(\frac {\left (-\frac {5 d}{72}-\frac {f}{9}\right ) x^{3}+\left (\frac {17 d}{72}+\frac {5 f}{18}\right ) x -\frac {e \,x^{2}}{9}+\frac {5 e}{18}}{x^{4}-5 x^{2}+4}+\frac {19 \ln \left (x +2\right ) d}{864}-\frac {\ln \left (x +2\right ) e}{27}+\frac {13 \ln \left (x +2\right ) f}{216}-\frac {\ln \left (x +1\right ) d}{108}+\frac {\ln \left (x +1\right ) e}{27}-\frac {7 \ln \left (x +1\right ) f}{108}+\frac {\ln \left (1-x \right ) d}{108}+\frac {\ln \left (1-x \right ) e}{27}+\frac {7 \ln \left (1-x \right ) f}{108}-\frac {19 \ln \left (2-x \right ) d}{864}-\frac {\ln \left (2-x \right ) e}{27}-\frac {13 \ln \left (2-x \right ) f}{216}\) \(141\)
parallelrisch \(-\frac {-240 e +96 f \,x^{3}-204 d x +76 \ln \left (x -2\right ) d +128 \ln \left (x -2\right ) e -32 \ln \left (x -1\right ) d -128 \ln \left (x -1\right ) e +32 \ln \left (x -2\right ) x^{4} e -208 \ln \left (x +2\right ) f +224 \ln \left (x +1\right ) f +96 e \,x^{2}-160 \ln \left (x -2\right ) x^{2} e +40 \ln \left (x -1\right ) x^{2} d +160 \ln \left (x -1\right ) x^{2} e -40 \ln \left (x +1\right ) x^{2} d +160 \ln \left (x +1\right ) x^{2} e +95 \ln \left (x +2\right ) x^{2} d -160 \ln \left (x +2\right ) x^{2} e +19 \ln \left (x -2\right ) x^{4} d -76 \ln \left (x +2\right ) d +128 \ln \left (x +2\right ) e +32 \ln \left (x +1\right ) d -128 \ln \left (x +1\right ) e +60 x^{3} d -56 \ln \left (x -1\right ) x^{4} f +56 \ln \left (x +1\right ) x^{4} f -52 \ln \left (x +2\right ) x^{4} f -260 \ln \left (x -2\right ) x^{2} f +280 \ln \left (x -1\right ) x^{2} f -280 \ln \left (x +1\right ) x^{2} f +260 \ln \left (x +2\right ) x^{2} f +52 \ln \left (x -2\right ) x^{4} f +208 \ln \left (x -2\right ) f -224 \ln \left (x -1\right ) f -8 \ln \left (x -1\right ) x^{4} d -32 \ln \left (x -1\right ) x^{4} e +8 \ln \left (x +1\right ) x^{4} d -32 \ln \left (x +1\right ) x^{4} e -19 \ln \left (x +2\right ) x^{4} d +32 \ln \left (x +2\right ) x^{4} e -95 \ln \left (x -2\right ) x^{2} d -240 f x}{864 \left (x^{4}-5 x^{2}+4\right )}\) \(369\)

[In]

int((f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x,method=_RETURNVERBOSE)

[Out]

((-5/72*d-1/9*f)*x^3+(17/72*d+5/18*f)*x-1/9*e*x^2+5/18*e)/(x^4-5*x^2+4)+(-19/864*d-1/27*e-13/216*f)*ln(x-2)+(-
1/108*d+1/27*e-7/108*f)*ln(x+1)+(1/108*d+1/27*e+7/108*f)*ln(x-1)+(19/864*d-1/27*e+13/216*f)*ln(x+2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 217 vs. \(2 (100) = 200\).

Time = 0.31 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.89 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=-\frac {12 \, {\left (5 \, d + 8 \, f\right )} x^{3} + 96 \, e x^{2} - 12 \, {\left (17 \, d + 20 \, f\right )} x - {\left ({\left (19 \, d - 32 \, e + 52 \, f\right )} x^{4} - 5 \, {\left (19 \, d - 32 \, e + 52 \, f\right )} x^{2} + 76 \, d - 128 \, e + 208 \, f\right )} \log \left (x + 2\right ) + 8 \, {\left ({\left (d - 4 \, e + 7 \, f\right )} x^{4} - 5 \, {\left (d - 4 \, e + 7 \, f\right )} x^{2} + 4 \, d - 16 \, e + 28 \, f\right )} \log \left (x + 1\right ) - 8 \, {\left ({\left (d + 4 \, e + 7 \, f\right )} x^{4} - 5 \, {\left (d + 4 \, e + 7 \, f\right )} x^{2} + 4 \, d + 16 \, e + 28 \, f\right )} \log \left (x - 1\right ) + {\left ({\left (19 \, d + 32 \, e + 52 \, f\right )} x^{4} - 5 \, {\left (19 \, d + 32 \, e + 52 \, f\right )} x^{2} + 76 \, d + 128 \, e + 208 \, f\right )} \log \left (x - 2\right ) - 240 \, e}{864 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \]

[In]

integrate((f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

-1/864*(12*(5*d + 8*f)*x^3 + 96*e*x^2 - 12*(17*d + 20*f)*x - ((19*d - 32*e + 52*f)*x^4 - 5*(19*d - 32*e + 52*f
)*x^2 + 76*d - 128*e + 208*f)*log(x + 2) + 8*((d - 4*e + 7*f)*x^4 - 5*(d - 4*e + 7*f)*x^2 + 4*d - 16*e + 28*f)
*log(x + 1) - 8*((d + 4*e + 7*f)*x^4 - 5*(d + 4*e + 7*f)*x^2 + 4*d + 16*e + 28*f)*log(x - 1) + ((19*d + 32*e +
 52*f)*x^4 - 5*(19*d + 32*e + 52*f)*x^2 + 76*d + 128*e + 208*f)*log(x - 2) - 240*e)/(x^4 - 5*x^2 + 4)

Sympy [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\text {Timed out} \]

[In]

integrate((f*x**2+e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.92 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{864} \, {\left (19 \, d - 32 \, e + 52 \, f\right )} \log \left (x + 2\right ) - \frac {1}{108} \, {\left (d - 4 \, e + 7 \, f\right )} \log \left (x + 1\right ) + \frac {1}{108} \, {\left (d + 4 \, e + 7 \, f\right )} \log \left (x - 1\right ) - \frac {1}{864} \, {\left (19 \, d + 32 \, e + 52 \, f\right )} \log \left (x - 2\right ) - \frac {{\left (5 \, d + 8 \, f\right )} x^{3} + 8 \, e x^{2} - {\left (17 \, d + 20 \, f\right )} x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \]

[In]

integrate((f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

1/864*(19*d - 32*e + 52*f)*log(x + 2) - 1/108*(d - 4*e + 7*f)*log(x + 1) + 1/108*(d + 4*e + 7*f)*log(x - 1) -
1/864*(19*d + 32*e + 52*f)*log(x - 2) - 1/72*((5*d + 8*f)*x^3 + 8*e*x^2 - (17*d + 20*f)*x - 20*e)/(x^4 - 5*x^2
 + 4)

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.95 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\frac {1}{864} \, {\left (19 \, d - 32 \, e + 52 \, f\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{108} \, {\left (d - 4 \, e + 7 \, f\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{108} \, {\left (d + 4 \, e + 7 \, f\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{864} \, {\left (19 \, d + 32 \, e + 52 \, f\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {5 \, d x^{3} + 8 \, f x^{3} + 8 \, e x^{2} - 17 \, d x - 20 \, f x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \]

[In]

integrate((f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

1/864*(19*d - 32*e + 52*f)*log(abs(x + 2)) - 1/108*(d - 4*e + 7*f)*log(abs(x + 1)) + 1/108*(d + 4*e + 7*f)*log
(abs(x - 1)) - 1/864*(19*d + 32*e + 52*f)*log(abs(x - 2)) - 1/72*(5*d*x^3 + 8*f*x^3 + 8*e*x^2 - 17*d*x - 20*f*
x - 20*e)/(x^4 - 5*x^2 + 4)

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.93 \[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx=\ln \left (x-1\right )\,\left (\frac {d}{108}+\frac {e}{27}+\frac {7\,f}{108}\right )-\ln \left (x+1\right )\,\left (\frac {d}{108}-\frac {e}{27}+\frac {7\,f}{108}\right )-\ln \left (x-2\right )\,\left (\frac {19\,d}{864}+\frac {e}{27}+\frac {13\,f}{216}\right )+\ln \left (x+2\right )\,\left (\frac {19\,d}{864}-\frac {e}{27}+\frac {13\,f}{216}\right )+\frac {\left (-\frac {5\,d}{72}-\frac {f}{9}\right )\,x^3-\frac {e\,x^2}{9}+\left (\frac {17\,d}{72}+\frac {5\,f}{18}\right )\,x+\frac {5\,e}{18}}{x^4-5\,x^2+4} \]

[In]

int((d + e*x + f*x^2)/(x^4 - 5*x^2 + 4)^2,x)

[Out]

log(x - 1)*(d/108 + e/27 + (7*f)/108) - log(x + 1)*(d/108 - e/27 + (7*f)/108) - log(x - 2)*((19*d)/864 + e/27
+ (13*f)/216) + log(x + 2)*((19*d)/864 - e/27 + (13*f)/216) + ((5*e)/18 - x^3*((5*d)/72 + f/9) - (e*x^2)/9 + x
*((17*d)/72 + (5*f)/18))/(x^4 - 5*x^2 + 4)